package top.wintp.offlinedataanalysis.anlyser.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * stats_inbound
 * @author 
 */
public class StatsInbound extends StatsInboundKey implements Serializable {
    /**
     * 活跃用户数
     */
    private Integer activeUsers;

    /**
     * 会话个数
     */
    private Integer sessions;

    /**
     * 跳出会话个数
     */
    private Integer bounceSessions;

    private Date created;

    private static final long serialVersionUID = 1L;

    public Integer getActiveUsers() {
        return activeUsers;
    }

    public void setActiveUsers(Integer activeUsers) {
        this.activeUsers = activeUsers;
    }

    public Integer getSessions() {
        return sessions;
    }

    public void setSessions(Integer sessions) {
        this.sessions = sessions;
    }

    public Integer getBounceSessions() {
        return bounceSessions;
    }

    public void setBounceSessions(Integer bounceSessions) {
        this.bounceSessions = bounceSessions;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StatsInbound other = (StatsInbound) that;
        return (this.getPlatformDimensionId() == null ? other.getPlatformDimensionId() == null : this.getPlatformDimensionId().equals(other.getPlatformDimensionId()))
            && (this.getDateDimensionId() == null ? other.getDateDimensionId() == null : this.getDateDimensionId().equals(other.getDateDimensionId()))
            && (this.getInboundDimensionId() == null ? other.getInboundDimensionId() == null : this.getInboundDimensionId().equals(other.getInboundDimensionId()))
            && (this.getActiveUsers() == null ? other.getActiveUsers() == null : this.getActiveUsers().equals(other.getActiveUsers()))
            && (this.getSessions() == null ? other.getSessions() == null : this.getSessions().equals(other.getSessions()))
            && (this.getBounceSessions() == null ? other.getBounceSessions() == null : this.getBounceSessions().equals(other.getBounceSessions()))
            && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPlatformDimensionId() == null) ? 0 : getPlatformDimensionId().hashCode());
        result = prime * result + ((getDateDimensionId() == null) ? 0 : getDateDimensionId().hashCode());
        result = prime * result + ((getInboundDimensionId() == null) ? 0 : getInboundDimensionId().hashCode());
        result = prime * result + ((getActiveUsers() == null) ? 0 : getActiveUsers().hashCode());
        result = prime * result + ((getSessions() == null) ? 0 : getSessions().hashCode());
        result = prime * result + ((getBounceSessions() == null) ? 0 : getBounceSessions().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", activeUsers=").append(activeUsers);
        sb.append(", sessions=").append(sessions);
        sb.append(", bounceSessions=").append(bounceSessions);
        sb.append(", created=").append(created);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}